using System;
using Microsoft.WindowsAzure.ServiceRuntime; 

namespace AzureContrib.WindowsAzure.ServiceRuntime
{
	/// <summary>
	/// Wrapper contract for <see cref="RoleEnvironment"/> data.
	/// </summary>
	public interface IRoleEnvironment
	{
		/// <summary>
		/// <see cref="RoleEnvironment.DeploymentId"/>
		/// </summary>
		string DeploymentId { get; }

		/// <summary>
		/// <see cref="RoleEnvironment.CurrentRoleInstance"/>
		/// </summary>
		IRoleInstance CurrentRoleInstance { get; }

		/// <summary>
		/// <see cref="RoleEnvironment.IsAvailable"/>
		/// </summary>
		bool IsAvailable { get; }

		/// <summary>
		/// <see cref="RoleEnvironment.GetLocalResource"/>
		/// </summary>
		ILocalResource GetLocalResource(string localResourceName);

		/// <summary>
		/// <see cref="RoleEnvironment.GetConfigurationSettingValue"/>
		/// </summary>
		string GetConfigurationSettingValue(string configurationSettingName);

		/// <summary>
		/// Try <see cref="RoleEnvironment.GetConfigurationSettingValue"/>
		/// </summary>
		bool TryGetConfigurationSettingValue(string configurationSettingName, out string settingValue);

		/// <summary>
		/// Wrapper for <see cref="RoleEnvironment.Changing"/>.
		/// </summary>
		event EventHandler<RoleEnvironmentChangingEventArgs> Changing;

		/// <summary>
		/// Wrapper for <see cref="RoleEnvironment.Changed"/>.
		/// </summary>
		event EventHandler<RoleEnvironmentChangedEventArgs> Changed;
	}
}